//
//  NetworkEngine.h
//  NetworkDemo
//
//  Created by 万孟超 on 2021/9/7.
//

#import <Foundation/Foundation.h>
#import "NetworkBaseRequest.h"

NS_ASSUME_NONNULL_BEGIN

@protocol NetworkProgressDelegate <NSObject>

@optional
/// 网络请求进度
/// @param request 请求
/// @param progress 进度
- (void)network:(NetworkBaseRequest *)request progress:(NSProgress *)progress;

@end

@interface NetworkEngine : NSObject
//请求唯一标志符
@property (nonatomic, copy, readonly) NSString *enginePoint;

- (instancetype)init NS_UNAVAILABLE;

/// 初始化方法
/// @param method 绑定的方法名
- (instancetype)initWithRequestMethod:(NSString *)method;

/// 取消网络请求
- (void)cancelNetwork;

@end

NS_ASSUME_NONNULL_END
